package com.gxy.learn.backup.shiroauth.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxy.learn.backup.shiroauth.entity.SysMenu;
import com.gxy.learn.backup.shiroauth.vo.UserMenuVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * author: Gao xueyong
 * Create at: 2021/12/15 下午9:49
 */
public interface SysMenuMapper extends BaseMapper<SysMenu> {

    /**
     * 根据登陆账号获取用户菜单、权限
     *
     * @param loginName
     * @return
     */
    List<UserMenuVO> getSysMenuByAccount(@Param("loginName") String loginName);

    /**
     * 根据接口或页面地址获取菜单
     *
     * @param href
     * @return
     */
    SysMenu getSysMenuByHref(@Param("href") String href);
}
